package com.cxso.example.domain.wlpt.driver;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Setter
@Getter
@Accessors(chain = true)
@Schema(description = "司机基础信息")
public class ApiDriverBasicDomain {

    @Schema(description = "司机姓名")
    @NotBlank(message = "司机姓名不能为空")
    @Pattern(regexp = "^[\u2E80-\u9FFF·]{2,60}$", message = "司机姓名格式错误")
    private String driverName;

    @Schema(description = "司机手机号")
    @NotBlank(message = "司机手机号不能为空")
    @Pattern(regexp = "(?:0|86|\\+86)?1[3-9]\\d{9}", message = "手机号格式错误")
    private String driverPhone;

    @Schema(description = "身份证")
    @NotBlank(message = "身份证不能为空")
    @Pattern(regexp = "[1-9]\\d{5}[1-2]\\d{3}((0\\d)|(1[0-2]))(([012]\\d)|3[0-1])\\d{3}(\\d|X|x)", message = "身份证格式错误")
    private String driverIdCard;

    @Schema(description = "身份证正面图片")
    @NotBlank(message = "身份证正面图片不能为空")
    private String idCardFrontImg;

    @Schema(description = "身份证反面图片")
    @NotBlank(message = "身份证反面图片不能为空")
    private String idCardBackImg;

}
